Skip to content

Conversation

@emil-dietrich
Copy link

@emil-dietrich emil-dietrich commented Jan 13, 2026

Based upon the work in #144157. Last commit says Anyone is welcome to pick this back up. I hope I understood correctly and effort/time to rebase was the blocker on that PR. My first PR on rust-lang - so let me know if I could've done something better.

@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2026

changes to the core type system

cc @lcnr

This PR changes rustc_public

cc @oli-obk, @celinval, @ouz-a, @makai410

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred to the CTFE / Miri interpreter

cc @rust-lang/miri

Some changes occurred in exhaustiveness checking

cc @Nadrieril

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred in compiler/rustc_sanitizers

cc @rcvalle

@rustbot rustbot added PG-exploit-mitigations Project group: Exploit mitigations S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jan 13, 2026
@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2026

r? @WaffleLapkin

rustbot has assigned @WaffleLapkin.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@emil-dietrich
Copy link
Author

emil-dietrich commented Jan 13, 2026

r? @compiler-errors
I hope this is reasonable

@rustbot
Copy link
Collaborator

rustbot commented Jan 13, 2026

Failed to set assignee to compiler-errors: invalid assignee

Note: Only org members with at least the repository "read" role, users with write permissions, or people who have commented on the PR may be assigned.

@compiler-errors
Copy link
Contributor

I don’t work on Rust anymore unfortunately.

r? lcnr

@rustbot rustbot assigned lcnr and unassigned WaffleLapkin Jan 13, 2026
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu-llvm-20-1 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
test [ui] tests/ui/imports/ambiguous-6.rs ... ok
test [ui] tests/ui/imports/ambiguous-4.rs ... ok
test [ui] tests/ui/imports/ambiguous-7.rs ... ok
test [ui] tests/ui/imports/ambiguous-9.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-glob-vs-multiouter.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-globvsglob.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-no-implicit-prelude.rs ... ok
test [ui] tests/ui/imports/ambiguous-8.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-core-glob.rs ... ok
test [ui] tests/ui/imports/ambiguous-glob-vs-expanded-extern.rs ... ok
test [ui] tests/ui/imports/ambiguous-panic-non-prelude-std-glob.rs ... ok
---
To only update this specific test, also pass `--test-args async-await/partial-drop-partial-reinit.rs`

error: 1 errors occurred comparing output.
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/partial-drop-partial-reinit.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/partial-drop-partial-reinit" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2021"
stdout: none
--- stderr -------------------------------
error[E0277]: `NotSend` cannot be sent between threads safely
##[error]  --> /checkout/tests/ui/async-await/partial-drop-partial-reinit.rs:6:16
   |
LL |     gimme_send(foo());
   |     ---------- ^^^^^ `NotSend` cannot be sent between threads safely
   |     |
   |     required by a bound introduced by this call
...
LL | async fn foo() {
   |               - within this `impl Future<Output = ()>`
---
  --> /checkout/tests/ui/async-await/partial-drop-partial-reinit.rs:26:16
   |
LL |   async fn foo() {
   |  ________________^
LL | |     //~^ NOTE used within this `async` fn body
LL | |     //~| NOTE within this `impl Future
LL | |     let mut x = (NotSend {},);
...  |
LL | |     bar().await;
LL | | }
   | |_^
note: required by a bound in `gimme_send`
  --> /checkout/tests/ui/async-await/partial-drop-partial-reinit.rs:12:18
   |
LL | fn gimme_send<T: Send>(t: T) {
   |                  ^^^^ required by this bound in `gimme_send`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0277`.
------------------------------------------

---- [ui] tests/ui/async-await/partial-drop-partial-reinit.rs stdout end ----
---- [ui] tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `Unique<impl Future<Output = ()>>: Send`
##[error]  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:16:5
   |
LL |     require_send(process(&1));
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_async_auto_trait_overflow_only_parent_args`)
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:9:34
   |
LL |   async fn process<'a>(x: &'a u32) {
   |  __________________________________^
LL | |     Box::pin(process(x)).await;
LL | | }
   | |_^
note: required by a bound in `require_send`
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs:13:25
   |
LL | fn require_send(_: impl Send) {}
   |                         ^^^^ required by this bound in `require_send`

error: aborting due to 1 previous error

For more information about this error, try `rustc --explain E0275`.
------------------------------------------

---- [ui] tests/ui/async-await/recursive-async-auto-trait-overflow-only-parent-args.rs stdout end ----
---- [ui] tests/ui/async-await/recursive-async-auto-trait-overflow.rs stdout ----

error: test compilation failed although it shouldn't!
status: exit status: 1
command: env -u RUSTC_LOG_COLOR RUSTC_ICE="0" RUST_BACKTRACE="short" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2/bin/rustc" "/checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs" "-Zthreads=1" "-Zsimulate-remapped-rust-src-base=/rustc/FAKE_PREFIX" "-Ztranslate-remapped-path-to-local-path=no" "-Z" "ignore-directory-in-diagnostics-source-blocks=/cargo" "-Z" "ignore-directory-in-diagnostics-source-blocks=/checkout/vendor" "--sysroot" "/checkout/obj/build/aarch64-unknown-linux-gnu/stage2" "--target=aarch64-unknown-linux-gnu" "--check-cfg" "cfg(test,FALSE)" "--error-format" "json" "--json" "future-incompat" "-Ccodegen-units=1" "-Zui-testing" "-Zdeduplicate-diagnostics=no" "-Zwrite-long-types-to-disk=no" "-Cstrip=debuginfo" "--emit" "metadata" "-C" "prefer-dynamic" "--out-dir" "/checkout/obj/build/aarch64-unknown-linux-gnu/test/ui/async-await/recursive-async-auto-trait-overflow" "-A" "unused" "-W" "unused_attributes" "-A" "internal_features" "-A" "unused_parens" "-A" "unused_braces" "-Crpath" "-Cdebuginfo=0" "-Lnative=/checkout/obj/build/aarch64-unknown-linux-gnu/native/rust-test-helpers" "--edition=2024"
stdout: none
--- stderr -------------------------------
error[E0275]: overflow evaluating the requirement `Unique<impl Future<Output = ()>>: Send`
##[error]  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:13:5
   |
LL |     require_send(process());
   |     ^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`recursive_async_auto_trait_overflow`)
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
LL | |     Box::pin(process()).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
LL | |     Box::pin(process()).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
LL | |     Box::pin(process()).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
LL | |     Box::pin(process()).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
LL | |     Box::pin(process()).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
LL | |     Box::pin(process()).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
LL | |     Box::pin(process()).await;
LL | | }
   | |_^
   = note: required for `Unique<impl Future<Output = ()>>` to implement `Send`
note: required because it appears within the type `Box<impl Future<Output = ()>>`
  --> /rustc/FAKE_PREFIX/library/alloc/src/boxed.rs:234:11
note: required because it appears within the type `Pin<Box<impl Future<Output = ()>>>`
  --> /rustc/FAKE_PREFIX/library/core/src/pin.rs:1094:11
note: required because it's used within this `async` fn body
  --> /checkout/tests/ui/async-await/recursive-async-auto-trait-overflow.rs:6:24
   |
LL |   async fn process<'a>() {
   |  ________________________^
---
diff of run.stdout:

10                 offset: 1,
11             },
12             Field {
-                 ty: TypeId(0x41223169ff28813ba79b7268a2a968d9),
+                 ty: TypeId(0xe09322dd03745d1d9f5ce3532baab234),
14                 offset: 2,
15             },
16         ],


The actual run.stdout differed from the expected run.stdout
---
--- stdout -------------------------------
Tuple(
    Tuple {
        fields: [
            Field {
                ty: TypeId(0x0596b48cc04376e64d5c788c2aa46bdb),
                offset: 0,
            },
            Field {
                ty: TypeId(0x0596b48cc04376e64d5c788c2aa46bdb),
                offset: 1,
            },
            Field {
                ty: TypeId(0xe09322dd03745d1d9f5ce3532baab234),
                offset: 2,
            },
        ],
    },
)
Other

@Kivooeo
Copy link
Member

Kivooeo commented Jan 13, 2026

hi, thanks for picking this up, but i guess it wasn't finished back then for some reason, and it seems to me because of exactly same problem that your pr hit here with overflow evaluating

so it seems like this problem is more complex and im not really sure if that's a good first issue (don't get me wrong i'm not trying to discourage you on this)

@rust-bors
Copy link
Contributor

rust-bors bot commented Jan 15, 2026

☔ The latest upstream changes (presumably #151144) made this pull request unmergeable. Please resolve the merge conflicts.

@lcnr
Copy link
Contributor

lcnr commented Jan 15, 2026

The remaining work is quite technically involved #144157 (comment). @BoxyUwU is currently looking into introducing where-bounds on binders in general, which will supersede this. Alternatively, we can finish this once the new trait solver is stable #107374

@lcnr
Copy link
Contributor

lcnr commented Jan 15, 2026

Thank you for trying to continue this work.

@lcnr lcnr closed this Jan 15, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jan 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PG-exploit-mitigations Project group: Exploit mitigations T-clippy Relevant to the Clippy team. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants